<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>返回值</title>
  </head>
  <body>
    <script>
      function judge1() {
        var a = 8;
        return a === 8 ? "a=8" : "a!=8";
      }
      console.log(judge1());
      function judge2(a) {
        if (!a) {
          return "a为空!";
        }
        return "a不为空," + "a=" + a;
      }
      console.log(judge2(6));
    </script>
  </body>
</html>
